package com.example.terrorsms.model;

import android.os.Parcel;
import android.os.Parcelable;

public class ContactInfo implements Parcelable {

	private String name;
	private String birthday;
	private String number;
	
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	private boolean selected;
	
	public ContactInfo() {
	}

	public ContactInfo(Parcel p) {
		setName(p.readString());
		setBirthday(p.readString());
	}
	
	public String getDisplayName() {
		return getName() + "\nam " + getBirthday();
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(getName());
		dest.writeString(getBirthday());
	}
	
	public static final Parcelable.Creator<ContactInfo> CREATOR = new Parcelable.Creator<ContactInfo>() {
		public ContactInfo createFromParcel(Parcel in) {
		    return new ContactInfo(in);
		}
		
		public ContactInfo[] newArray(int size) {
		    return new ContactInfo[size];
		}
	};
	
}
